package com.bafa.front.presentationbeans.playerhistory;

import com.bafa.objects.player.PlayerTeam;
import com.bafa.services.RetrieveServices;

public class TeamGoalsBean implements Comparable{

	private int teamId;
	private int goals;
	private String teamName;

	public TeamGoalsBean(PlayerTeam playerTeam) {
		
		this.teamId = playerTeam.getTeamId();
		this.goals = playerTeam.getGoals();
		this.teamName = RetrieveServices.getTeam(""+teamId).getName();
	}
	
	public int compareTo(Object arg0) {
		if(((TeamGoalsBean)arg0).getGoals()!=this.goals)
			return ((TeamGoalsBean)arg0).getGoals()-this.goals;
		else
			return 1;
	}

	public int getGoals() {
		return goals;
	}

	public void setGoals(int goals) {
		this.goals = goals;
	}

	public int getTeamId() {
		return teamId;
	}

	public void setTeamId(int teamId) {
		this.teamId = teamId;
	}

	public String getTeamName() {
		return teamName;
	}

	public void setTeamName(String teamName) {
		this.teamName = teamName;
	}
}
